<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        let arr = [1,2,4,5,7,10];
        // let arr1 = arr.filter(item=>{
        //     if(item%5==0){
        //         return true
        //     }else{
        //         return false
        //     }
        // })
        // item指的就是数组中的每一项
        let arr1 = arr.filter(item=>item%5==0)
        alert(arr1)
    </script>
</head>
<body>

</body>
</html>